package code;

public class QuestionNum_03_7 {
    public static void main(String[] args) {
        int sum = 0;
        int countFlag = 0;
        for (int i=1;i<=100;i++){
            for (int j=1;j<=i;j++){
                if (i % j == 0){
                    countFlag++;
                }
            }
            if (countFlag == 2){

                System.out.print(i+",");
                sum++;
            }
            countFlag = 0;
        }
        System.out.println("一共有"+sum+"个质数");
    }
}
